# HG changeset patch # User Mads Kiilerich # Date 1705006735 -3600 # Thu Jan 11 21:58:55 2024 +0100 # Node ID 60ffa0a3c5806d3e9cbbcb70eebd6a1afbe804d8 # Parent c625a18c3a3de93cf9750f23a496664c653a353d subrepoutil: pass re.sub 'count' argument by name Python 3.13 started warning: DeprecationWarning: 'count' is passed as positional argument diff --git a/mercurial/subrepoutil.py b/mercurial/subrepoutil.py --- a/mercurial/subrepoutil.py +++ b/mercurial/subrepoutil.py @@ -131,7 +131,7 @@ def state(ctx: "context.changectx", ui: # extra escapes are needed because re.sub string decodes. repl = re.sub(br'\\\\([0-9]+)', br'\\\1', repl) try: - src = re.sub(pattern, repl, src, 1) + src = re.sub(pattern, repl, src, count=1) except re.error as e: raise error.Abort( _(b"bad subrepository pattern in %s: %s") _______________________________________________ Mercurial-devel mailing list Mercurial-devel@lists.mercurial-scm.org https://lists.mercurial-scm.org/mailman/listinfo/mercurial-devel